/**
 * Created by JetBrains PhpStorm.
 * User: jonatan
 * Date: 1/24/12
 * Time: 2:37 PM
 * To change this template use File | Settings | File Templates.
 */


function addCategorySubscription(target) {
    $.get('/subscribe/category/' + target, function(data){
        if (data == 'true') {
            $('#subscribe').addClass('hide');
            $('#unsubscribe').removeClass('hide');
        }
    });
}

function removeCategorySubscription(target) {
    $.get('/unsubscribe/category/' + target, function(data){
        if (data == 'true') {
            $('#subscribe').removeClass('hide');
            $('#unsubscribe').addClass('hide');
        }
    });
}

function addChannelSubscription(target) {
    $.get('/subscribe/channel/' + target, function(data){
        if (data == 'true') {
            $('#subscribe').addClass('hide');
            $('#unsubscribe').removeClass('hide');
        }
    });
}

function removeChannelSubscription(target) {
    $.get('/unsubscribe/channel/' + target, function(data){
        if (data == 'true') {
            $('#subscribe').removeClass('hide');
            $('#unsubscribe').addClass('hide');
        }
    });
}